package com.ruoyi.msg.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.annotation.UserDrugInfo;
import com.ruoyi.common.annotation.UserMemberInfo;
import com.ruoyi.common.convert.ExcelDictConvert;
import lombok.Data;

import java.util.Date;


/**
 * 消息推送视图对象 msg_push
 *
 * @author xiaohao
 * @date 2023-02-01
 */
@Data
@ExcelIgnoreUnannotated
public class MsgPushVo {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ExcelProperty(value = "主键")
    private Long id;

    /**
     * 消息接收者姓名
     */
    @ExcelProperty(value = "消息接收者姓名")
    private Long appointorId;

    @UserMemberInfo
    public Object getUserMemberInfo() {
        return appointorId;
    }

    @UserDrugInfo
    public Object getUserDrugInfo() {
        return appointorId;
    }

    /**
     * user_member/user_drug
     */
    @ExcelProperty(value = "消息目标类型")
    private String targetType;

    /**
     * 标题
     */
    @ExcelProperty(value = "标题")
    private String title;

    /**
     * 内容
     */
    @ExcelProperty(value = "内容")
    private String content;

    /**
     * 推送类型
     */
    @ExcelProperty(value = "推送类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "xxtslx")
    private String type;

    /**
     * 推送状态
     */
    @ExcelProperty(value = "推送状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "xxtszt")
    private String status;

    /**
     * 是否读取
     */
    @ExcelProperty(value = "是否读取", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_yes_no")
    private String readFlag;

    /**
     * 推送时间
     */
    @ExcelProperty(value = "推送时间")
    private Date createTime;


}
